package com.eastfair.certificate.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.certificate.dto.BlacklistDTO;
import com.eastfair.certificate.dto.BlacklistPageQuery;
import com.eastfair.certificate.entity.Blacklist;
import com.eastfair.certificate.vo.BlacklistVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 *
 * </p>
 *
 * @author clm
 * @date 2022-08-02
 */
public interface BlacklistService extends SuperService<Blacklist> {
    /**
     * do转vo
     *
     * @param model
     */
    BlacklistVO doToVo(Blacklist model);

    /**
     * do转vo
     *
     * @param modelList
     */
    List<BlacklistVO> doToVos(List<Blacklist> modelList);


    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<Blacklist> list(BlacklistDTO modelDTO, List<Long> ids);

    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<Blacklist> listOfCache(BlacklistDTO modelDTO, List<Long> ids);

    /**
     * @return
     * @Author clm
     * @Description //分页查询
     * @Date 11:25 2022/8/2
     * @Param [params]
     **/
    Page<BlacklistVO> queryPage(PageParams<BlacklistPageQuery> params);

    /**
     * @return void
     * @Author clm
     * @Description //取消
     * @Date 11:56 2022/8/2
     * @Param [blackId]
     **/
    void cancel(Long blackId);

    /**
     * @return java.lang.Boolean
     * @Author clm
     * @Description //是否黑名单里
     * @Date 10:15 2022/8/6
     * @Param []
     **/
    Boolean isInBlackList(String cardNumber, Long exhibitionId, String phoneNumber, Long companyId);


    /**
     * @return void
     * @Author ligang
     * @Description //移除黑名单
     * @Date 11:56 2023/2/2
     * @Param [blackIds]
     **/
    void removeBlack(List<Long> blackIds);


    /**
     * @return void
     * @Author ligang
     * @Description 添加黑名单
     * @Date 11:56 2023/2/2
     * @Param [blacklist]
     **/
    void addBlack(Blacklist blacklist);
}
